fix(auth): support loopback MCP client registration - #2021
Open
edmonday wants to merge 8 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Codex and Claude can now dynamically register separate native public OAuth clients for Changelog through exact HTTP loopback callbacks. Forge supplies omitted native/public metadata only when every redirect uses
localhost,127.0.0.1, or[::1]; explicit client types, confidential clients, and non-loopback or mixed registrations retain Better Auth's normal validation.This is the Forge issuance half of the Changelog MCP integration. Changelog PR #79 owns the protected
/mcpresource andlist_entriestool. Production issuance remains disabled, and preview remains deferred until Changelog has a stable preview domain.Design and safety
Work Loop
ce:plandone —docs/roadmap/platform/feat-399-changelog-first-party-auth.mdce:workdonece:reviewdonece:compounddoneNotes
Local acceptance registered different Codex and Claude client identities and token families, narrowed both to the approved
changelog:readgrant, exercised authorization-code exchange and refresh/reconnect, read a real Changelog entry, and denied an ungranted capability. The earlier run covered browser consent end to end. The final post-fix receipt submitted the same authenticated consent payload directly because its temporary metadata proxy did not forward the Next.js development WebSocket.The receipt is recorded in
feat-399, which this PR marks complete. Production remained disabled throughout.Validation:
New concepts
OAuth loopback callback
A local CLI can open a temporary HTTP listener on the same computer and receive the browser's authorization response there. Exact loopback hosts never send the callback across the public network, so native clients may use HTTP for this narrow case; ordinary web callbacks still require HTTPS.
This PR recognizes the loopback pattern only when the client omitted its application type and every redirect is local. It does not relax Better Auth's validation for explicit web clients or public-network redirects.
Related: JesusFilm/jfp-changelog#71